Skip to content

Conversation

@dellson-arch
Copy link

This PR clarifies the documentation for path.isAbsolute() by explicitly stating
that it only checks whether a path is absolute and does not validate whether the
path is safe to use.

@nodejs-github-bot nodejs-github-bot added doc Issues and PRs related to the documentations. path Issues and PRs related to the path subsystem. labels Jan 29, 2026
@dellson-arch
Copy link
Author

Thanks for reviewing! Happy to update wording or make changes if needed.


The `path.isAbsolute()` method determines if the literal `path` is absolute.
Therefore, it’s not safe for mitigating path traversals.
Therefore, it’s not safe for mitigating path traversals attacks. This method only checks whether a path is absolute and does not validate whether it is safe to use.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove redundant s and word wrap.

Suggested change
Therefore, it’s not safe for mitigating path traversals attacks. This method only checks whether a path is absolute and does not validate whether it is safe to use.
Therefore, it’s not safe for mitigating path traversal attacks. This method
only checks whether a path is absolute and does not validate whether it
is safe to use.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand what's the point of the added test, isn't it just repeating what's already there?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

doc Issues and PRs related to the documentations. path Issues and PRs related to the path subsystem.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants